﻿/****************************************************************************
** file: ToupCamCamera.cpp
** brief: 杭州图谱光电科技有限公司 显微镜相机支持代码
** Copyright (C) LiYuan
** Author: LiYuan
** E-Mail: 18069211#qq(.)com
** Version 0.0.1
** Last modified: 2019.07.20
** Modified By: LiYuan
****************************************************************************/


#include <QDebug>
#include "CameraTUCAM.h"
#include "CameraTUCAM_private.h"
namespace Qly {

CameraTUCAM::CameraTUCAM(QObject *parent)
{
    m_pCamera = new CameraTUCAM_p(parent);
    connect(m_pCamera, &CameraTUCAM_p::videoFrameReady, this, &IndustryCamera::videoFrameReady);
}

CameraTUCAM::~CameraTUCAM()
{
    m_pCamera->close();
    m_pCamera->deleteLater();
}

bool CameraTUCAM::isLive()
{
    return m_pCamera->isLive();
}

bool CameraTUCAM::openDefaultCamera()
{
    return m_pCamera->openDefaultCamera();
}

bool CameraTUCAM::openCameraByID(QString id)
{
    return m_pCamera->openCameraByID(id);
}

bool CameraTUCAM::startGrabbing()
{
    return m_pCamera->startGrabbing();
}

bool CameraTUCAM::stopGrabbing()
{
    return m_pCamera->stopGrabbing();
}

bool CameraTUCAM::saveSettingsToFile(QString fileName)
{
    return m_pCamera->saveSettingsToFile(fileName);
}

bool CameraTUCAM::loadSettingsFromFile(QString fileName)
{
    return m_pCamera->loadSettingsFromFile(fileName);
}

void CameraTUCAM::close()
{
    m_pCamera->close();
}

bool CameraTUCAM::setExposureTimeMode(AutoExposureMode mode)
{
    return m_pCamera->setExposureTimeMode(mode);
}

bool CameraTUCAM::exposureTimeMode(AutoExposureMode &mode)
{
    return m_pCamera->exposureTimeMode(mode);
}

bool CameraTUCAM::setExposureTime(double us)
{
    return m_pCamera->setExposureTime(us);
}

bool CameraTUCAM::exposureTime(double &us)
{
    return m_pCamera->exposureTime(us);
}

bool CameraTUCAM::exposureTimeRange(double &fMin, double &fMax, double &fValue)
{
    return m_pCamera->exposureTimeRange(fMin, fMax, fValue);
}

bool CameraTUCAM::showVCDPropertyPage()
{
    return m_pCamera->showVCDPropertyPage();
}

bool CameraTUCAM::frameRate(double &fps)
{
    return m_pCamera->frameRate(fps);
}

bool CameraTUCAM::setFrameRate(double fps)
{
    return m_pCamera->setFrameRate(fps);
}



} //namespace Qly


